import Vuex from 'vuex'
import Vue from 'vue'
Vue.use(Vuex)


const store = new Vuex.Store({
    
    state:{
        preTxt:"",
        imTxt:"",
        sufTxt:"",
        logState:"NO",
        //usercardshow
        name1:"---",
        quan:"@--",
        text:" ",
        flag:false,

        //user

        nowId:"",    
        nowUsername:"",
        nowStatus:"",
        nowEmail:"",       
        nowType:"",
        nowLocation:"",
        nowClasswork:"",
        nowPhone:"", 
        nowClassid:"",
        nowAboutme:"",

      


        userList:[
            {
                "id":"0",
                "company": "心动健康管理员",
                "username": "李白",
                "email": "123456789@qq.com",
                "firstName": "212121",
                "lastName": "数据监控员",
                "address": "南山敬老院, 某地, 中国",
                "city": "数据监控小组",
                "postalCode": "132154",
                "country":"12345678910",
                "aboutMe": `愿天下心诚剑士人人可剑开天门!`,
                "account":"123456",
                "pwd":"654321"
            }
        ]
    },
    
    // action:{
        
    //     loginFill(context){
    //         context.commit("loginFill")
    //     },
        
        
    //     OKR(context){
    //         context.commit("OKR")
    //     }
    // },

       
    // mutation:{
        
    //     findUser(state){
    //         for(var i=0;i<state.userList.length;i++){
    //             if(state.newUser[i].account=="123456"){
    //                 if(state.newUser[i].pwd=="123456"){
    //                     state.nowCompany=state.newUser[i].company
    //                     state.nowUsername=state.newUser[i].username
    //                     state.nowEmail=state.newUser[i].email
    //                     state.nowFirstName=state.newUser[i].firstName
    //                     state.nowLastName=state.newUser[i].lastName
    //                     state.nowAddress=state.newUser[i].address
    //                     state.nowCity=state.newUser[i].city
    //                     state.nowPostalCode=state.newUser[i].postalCode
    //                     state.nowCountry=state.newCountry[i].country
    //                     state.nowAboutMe=state.newAboutMe[i].aboutMe
    //                 }
    //             }
    //         }
    //     },
    //     loginFill(state){
    //         this.findUser(state)
    //     },
        
        
    // }
})      
export default store
